#pragma once

#include <opencv2/nonfree/nonfree.hpp>

#include <cv.h>

#include <cxcore.h>

#include <highgui.h>

#include <iostream>

#include <fstream>

using namespace cv;

using namespace std;

typedef struct Pair
{
	int index;
	float value;
} PAIR;

class CProcessor
{
private:

	string DATASET_PATH;

	int NUMBER_IMAGES;

	string XML_PATH;

	string VOCABULARY_PATH;

	int DICTIONARY_SIZE;

	vector<string> FILE_LIST;

public:

	CProcessor(void);

	~CProcessor(void);

	vector<string> GetFileList(string FileListPath);

	void Trainer();

	Mat CalcHistogram(Mat descriptor, Mat vocabulary);

	vector<PAIR> Matching(Mat queryImage);

	void ShowResult(vector<PAIR> result);
};

